Skip to content

refactor: anti-pattern fixes and UI improvements#11

Merged
GraysonCAdams merged 147 commits intomainfrom
refactor/anti-patterns-and-improvements
Mar 1, 2026
Merged

refactor: anti-pattern fixes and UI improvements#11
GraysonCAdams merged 147 commits intomainfrom
refactor/anti-patterns-and-improvements

Conversation

@GraysonCAdams
Copy link
Copy Markdown
Collaborator

Summary

  • CSS anti-patterns: Replaced all hardcoded hex colors (#fff, #000, etc.) with CSS custom properties (var(--reel-text), var(--bg-primary), var(--constant-white)) and converted border-radius: 50% to var(--radius-full) across 15+ files
  • Server safety: Wrapped comment deletion in a Drizzle transaction, added title length validation on clip create/update, added path traversal protection on avatar upload/delete
  • !important removal: Increased CSS specificity to eliminate !important declarations in 3 components
  • New features: Activity sheet overlay, share shortcut setup wizard, avatar crop modal, horizontal swipe filtering, progress bar thumb indicator, and UI auto-hide
  • Lint/type compliance: Fixed all ESLint warnings (resolve(), SvelteSet, max-lines, unused vars) and type errors to pass pre-commit/pre-push hooks

Test plan

  • Verify dark and light themes render correctly (no missing colors or broken styles)
  • Test comment deletion (should be atomic — no orphaned hearts/replies)
  • Test clip title editing respects 500-char limit
  • Verify avatar upload rejects path traversal attempts
  • Test share shortcut setup wizard flows (step navigation, API URL copy)
  • Confirm progress bar thumb appears on hover/scrub
  • Test filter bar swipe gestures on mobile
  • Run npm run check and npm run build — both pass with 0 errors

Delete orphaned components (VideoCard, MusicCard), empty barrel file,
unused vitest config, stub changelog, and outdated planning docs
Reduced from verbose inline docs to ~55 lines. Key details now
referenced via @docs/ imports. Removed duplicated design system
details in favor of single source of truth pointer.
Adds context-aware rules that only load when Claude works on
matching file patterns: svelte.md, styling.md, api.md, server.md,
testing.md. Reduces baseline context consumption.
Pre-allow dev/test/lint/format/git commands to reduce permission
prompts. Deny reads of .env and data/ for security. Add JSON
schema for autocomplete.
Excludes node_modules, build output, data/, lock files, docs/inspo/
binaries, and editor/OS files from Claude's automatic file reading.
Moves commit command to project .claude/commands/ so it's checked
into the repo and available to any contributor.
- data-model: add notifications, commentHearts, verificationCodes,
  commentViews tables; add music fields, avatarPath, accentColor,
  contentType, watchPercent, and other new columns
- api: add group management, notifications, profile preferences,
  health, comment hearts, views, retry, and unwatched-count endpoints;
  update auth to reflect unified action-based endpoint
- architecture: update directory structure to match actual components,
  stores, and server files; add music/share/scheduler modules
- features: update all statuses to reflect implemented state; add
  music sharing, phone verification, activity feed, group management
- notifications: restructure around in-app activity feed and push;
  add notifications table and mark-read/unread-count endpoints
- README: expand feature list, add prerequisites, add documentation
  table linking to all docs, add Odesli and Docker to tech stack
Split the upload/done/failed screen (template + styles + animations)
into a dedicated UploadStatus.svelte component, reducing AddVideoModal
from 657 to 238 lines.
Extract data logic (formatSize, formatDate, groupClipsByMonth,
fetchClipsList, deleteClips) into clipsManager.ts and individual
clip row into ClipRow.svelte to bring ClipsManager under 500 lines.
… settings page

Split the 717-line settings page into focused modules:
- settingsApi.ts (78 lines): theme, playback, accent, notification API functions
- NotificationSettings.svelte (136 lines): push notification preferences UI
- AccentColorPicker.svelte (48 lines): color swatch picker component
- Settings page reduced from 717 to 492 lines
Change max-lines ESLint rule from warn to error so oversized files
block PRs. Reduce lint:ci --max-warnings from 89 to 65.
Detect iOS Safari and show platform-specific install instructions
(Add to Home Screen) since beforeinstallprompt isn't available.
Persist dismissal in localStorage so it doesn't reappear.
Add architecture, ingestion flow, onboarding, and provider stack
diagrams. Update VitePress config with mermaid plugin and download
providers sidebar entry.
Add share endpoint and download provider docs to API reference.
Update Node version references and add migration notes to data model.
Replace ~50 custom inline SVGs across 16 component files with Phosphor
icon components. Update CSS selectors from `.parent svg` to
`.parent :global(svg)` for Svelte scoped style compatibility.
…es (phase 3)

Replace custom SVGs in error pages (MapPin, Shield, SmileySad),
offline page (WifiSlash), share page (XCircle, Prohibit, Check),
and setup wizard (CaretLeft, CaretRight, Check, DownloadSimple, Info).
Shallow checkout doesn't include the PR base SHA, causing
commitlint to fail with "Invalid revision range".
HUSKY=0 doesn't help when husky binary is absent (omitted as
devDependency). Delete the prepare script before npm ci instead.
gitleaks-action@v2 requires a paid license for org repos.
Use the open-source gitleaks binary directly instead.
@GraysonCAdams GraysonCAdams force-pushed the refactor/anti-patterns-and-improvements branch from 8413440 to b9b66ab Compare March 1, 2026 04:51
minimatch and tar vulns are in Node.js base image's bundled npm,
not our dependencies. Added .trivyignore until node:24-slim patches.
@GraysonCAdams GraysonCAdams merged commit ea7f343 into main Mar 1, 2026
14 checks passed
@GraysonCAdams GraysonCAdams deleted the refactor/anti-patterns-and-improvements branch March 1, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants